{% extends "adposting/view.html" %}  
{% comment %}
  $Id$
{% endcomment %}

{% load humanize %}

{% block ad %}
<div class="head">
 <span id="jobId">Ad Id : {{ ad.pk }}</span>
 <h2 style="margin: 0px; font-size: 16px;">{{ ad.title }}</h2>
  <h3>Equipment/Supply Type: {{ ad.fields_dict.equipmenttype }}</h3>
</div>

<p id="aboveSidebarView">Posted On : {{ ad.created_on|date:"F dS, Y" }}</p>


 <p>Asking Price: ${{ ad.fields_dict.price|intcomma }}</p>
 <h3>Condition: {{ ad.fields_dict.condition }}</h3>
 <h3>Item Location: {{ ad.fields_dict.location}}</h3>

<div id="sidebarView">
 <p class="head">Contact Information</p>
 <p>{{ ad.fields_dict.contactname }}</p>
 <p>{{ ad.fields_dict.phone }}</p>
 <p>{{ ad.fields_dict.contactcompanyname }}</p>
 <p><a href="http://www.{{ ad.fields_dict.website }}" target="_blank">{{ ad.fields_dict.website|slice:":26" }}</a></p>
 <p><a href="{% url contact.views.contact_ad ad.pk %}"><img src="{{ MEDIA_URL }}images/sellerButton.png"  alt="Contact" /></a></p>
 <ul class="head">
  <li><a href="javascript:window.print();">Print This Ad</a></li>
  <li><a href="javascript:;" onclick="window.location.href='mailto:?body=&quot;http://{{ site.domain }}/ads/{{ ad.pk }}&quot;';">Tell a Friend</a></li>
 </ul>
</div>

 
<div id="jobContent">
 <h3>Description :</h3>
 {{ ad.fields_dict.description|safe }}
</div>

 <div class="images">
 {% for image in ad.adimage_set.all %}
  {% if image.get_thumb_photo_url %}
   <a href="{{ image.get_full_photo_url }}"><img src="{{ image.get_thumb_photo_url }}" alt="Thumbnail" class="thumbnail" /></a>
  {% endif %}
 {% endfor %}
 </div>
{% endblock %}
